package
{
	/*
	import ResourcePackage.ExternalResource;
	import ResourcePackage.Resource;
	import ResourcePackage.ResourceMovieClip;
	
	import flash.display.MovieClip;
	import flash.display.Stage;
	*/
	public class StatePopup extends State
	{
		/*
		protected var movieClipResource:ResourceMovieClip = new ResourceMovieClip();
		protected var text:String;
		protected var b1Text:String;
		protected var b2Text:String;
		*/
		public function StatePopup(/*s:String,b1:String,b2:String=null*/)
		{
			super();
			/*
			this.text = s;
			this.b1Text = b1;
			this.b2Text = b2;
			*/
		}
		public override function Render(g:MyGraphics):void
		{
			if(this.stateIndex - 1 >= 0)
				Game.GetStateStack().GetStateAt(this.stateIndex - 1).Render(g);
			
		}
		/*
		public override function Update(dt:int):void
		{
			if(this.stateIndex - 1 >=0)
				Game.GetStateStack().GetStateAt(this.stateIndex - 1).Update(dt);
		}
		public override function Init():void
		{
			var s:Vector.<ExternalResource> = new Vector.<ExternalResource>();
			//s.push(new ExternalResource("",Resource.TYPE_MovieClip,CommonResource.clone(CommonResource.mvDialog)));
			s.push(new ExternalResource(movieClipResource,ExternalResource.TYPE_FromResource,CommonResource.mvDialog));
			Game.GetStateStack().Push(new StateLoading("Init",s,this,true));
			
			
			
		}
		public override function LoadComplete(success:Boolean, description:String):void
		{
			if(success)
			{
				//movieclip = objects[0];
				//movieclip.SetContainer(FBGame.mainFBGame);
				movieClipResource.GetMovieClip().SetDialogText(text);
				if(b2Text == null)
				{
					movieClipResource.GetMovieClip().SetDialogOneButton(b1Text);
				}
				else
				{
					movieClipResource.GetMovieClip().SetDialogTwoButton(b1Text,b2Text);
				}
				Game.GetMainWindow().stage.addChild(movieClipResource.GetMovieClip());
			}
			else
			{
				
			}
		}
		public override function Release():void
		{
			Game.GetMainWindow().stage.removeChild(movieClipResource.GetMovieClip());
		}
		public override function ReceiveMessage(mess:String,param:Array,sender:MovieClip):void
		{
			switch(mess)
			{
				case "button":
					Game.GetStateStack().Pop();
					break;
			}
		}
		*/
	}
}